package com.nuoniu.sibanyun.service.crm;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nuoniu.sibanyun.entity.bo.ProcessSimpleBo;
import com.nuoniu.sibanyun.entity.crm.Approval;
import com.nuoniu.sibanyun.entity.crm.CrmCustomer;
import com.nuoniu.sibanyun.entity.crm.WithdrawalRecord;

import java.util.List;

/**
 * <p>
 * 审批记录 服务类
 * </p>
 *
 * @author baiqiang
 * @since 2020-06-20
 */
public interface IApprovalService extends IService<Approval> {

    /**
     * 批量审核
     * @param ids
     * @param type
     * @param content
     */
    void approvalAll(String ids, Integer type, String content);

    /**
     * 加入审批流程
     * @author 小啊刚
     * @param approvalProcessId 流程id
     * @param sourceId 来源id
     * @param content 内容、标题
     * @param approvalUserId 审批人(多个逗号隔开)
     * @param processType 流程类型
     * @param approvalMode 审批方式
     * @param size 流程数量
     * @date 2020/6/20
     */
    void startProcess(Long approvalProcessId, Long sourceId, String content, String approvalUserId, Integer processType, Integer approvalMode, int size);

    /**
     * 批量 加入审批流程
     * @param processSimpleBos
     */
    void batchStartProcess(List<ProcessSimpleBo> processSimpleBos);

    /**
     *  审批记录列表
     * @author 小啊刚
     * @date 2020/7/10
     */
    Page<Approval> pageApproval(Page page, Approval approval);

    /**
     * 保存审批记录
     * @author 小啊刚
     * @date 2020/7/10
     */
    void saveApproval(Approval approval, List<CrmCustomer> updateCustomerList, List<WithdrawalRecord> updateWithdrawalRecordList,List<ProcessSimpleBo> processSimpleBos, List<Approval> closeApprovalList);
}
